package 创建数组;

public class demo5_数组最小值7 {
    public static void main(String[] args) {
    	int[] a = new int[5];
		int min = 100;
		for (int i = 0; i< a.length; i++) {
			a[i] = (int) (Math.random() * 100);
			System.out.println("a[" + i + "]" + "=" + a[i]);
			if (a[i] < min) {
				min = a[i];
			}
		}
		System.out.println("数组中最小元素为：" + min);
    }
}